<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/

namespace Buyer\Controller;
use Think\Controller;
class IndexController extends \Member\Controller\IndexController {

    public function indexAction(){

		$isemail=M('MemberCertificate')->token(false)->where(" type=1 AND uid=$this->uid AND status=5 ")->count();
		$ismobile=M('MemberCertificate')->token(false)->where(" type=2 AND uid=$this->uid AND status=5 ")->count();
		
		$this->assign('isemail',$isemail);
		$this->assign('ismobile',$ismobile);
		
		//待托管
		$notpaytask=M('Data')->token(false)->where(" type=1 AND uid=$this->uid AND cid=0 ")->count();
		$this->assign('notpaytask',$notpaytask);
		
		//进行中
		$normaltask=M('Data')->token(false)->where(" type=1 AND uid=$this->uid AND process_order=1 ")->count();
		$this->assign('normaltask',$normaltask);
		
		//待确认付款
		$okpaytask=M('Data')->token(false)->where(" type=1 AND uid=$this->uid AND process_order=4 ")->count();
		$this->assign('okpaytask',$okpaytask);
		
		//待评价
		$evaluatetask=M('Data')->token(false)->where(" type=1 AND uid=$this->uid AND process_order=5 ")->count();
		$this->assign('evaluatetask',$evaluatetask);
		
		//待确认付款任务列表
		$model=new \Data\Model\DataModel();
		$list=$model->GetCustomData(" uid=$this->uid AND process_order=4 AND process>3 AND process<6 ",'dateline DESC',8);
		$this->assign('list',$list);
		
		$this->display();	
    }

}